package com.water.dmdb.th;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;

public class Th1 {
    public static void main(String[] args) {
        List<String> list = new CopyOnWriteArrayList<>();
//        for (int i = 0; i < 10; i++) {
//            new Thread(()->{
//                String substring = UUID.randomUUID().toString().substring(0, 5);
//                list.add(substring);
//                System.out.println(list);
//            },String.valueOf(i)).start();
//            System.out.println("assa");
//        }
        String s = "assa";
        Object obj = "saas";
        List<String> list1 = new ArrayList<>();
        System.out.println(s.hashCode());
        System.out.println(obj.hashCode());
        System.out.println(list1.hashCode());
    }

}

class Data {
    public void sendMsg() {
        try {
            TimeUnit.SECONDS.sleep(2);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName() + "发信息" + "线程");
    }

    public void sendCall() {
        try {
            TimeUnit.SECONDS.sleep(2);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(Thread.currentThread().getName() + "打电话" + "线程");
    }
}